
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>如何托管到Pages上 · GitBook学习笔记</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="yangjh">
        
        
    
    <link rel="stylesheet" href="gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-ace/ace.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-quiz/style.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-search-pro/search.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-bibtex-indexed-cite/style.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-prism/prism-solarizedlight.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-page-footer-ex/style/plugin.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
        <link rel="stylesheet" href="styles/website.css">
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="Collaborate.html" />
    
    
    <link rel="prev" href="faq/Sidebar.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    
    
        
        <li>
            <a href="http://yangzh.cn" target="_blank" class="custom-link">Home</a>
        </li>
    
    

    
    <li class="divider"></li>
    

    
        
        <li class="header">基础问题</li>
        
        
    
        <li class="chapter " data-level="1.1" data-path="./">
            
                <a href="./">
            
                    
                        <b>1.1.</b>
                    
                    简介
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="faq/Step.html">
            
                <a href="faq/Step.html">
            
                    
                        <b>1.2.</b>
                    
                    使用GitBook制作文档的步骤是怎样的
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="faq/Contents.html">
            
                <a href="faq/Contents.html">
            
                    
                        <b>1.3.</b>
                    
                    如何制作多级目录
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">markdown</li>
        
        
    
        <li class="chapter " data-level="2.1" data-path="faq/Image.html">
            
                <a href="faq/Image.html">
            
                    
                        <b>2.1.</b>
                    
                    如何插入图片
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="md/pipe.html">
            
                <a href="md/pipe.html">
            
                    
                        <b>2.2.</b>
                    
                    如何在表格的内容中使用竖线|
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.3" data-path="md/url.html">
            
                <a href="md/url.html">
            
                    
                        <b>2.3.</b>
                    
                    如何在url中使用括号
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">功能拓展</li>
        
        
    
        <li class="chapter " data-level="3.1" data-path="faq/Plugins.html">
            
                <a href="faq/Plugins.html">
            
                    
                        <b>3.1.</b>
                    
                    如何安装插件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.2" data-path="faq/Recommand.html">
            
                <a href="faq/Recommand.html">
            
                    
                        <b>3.2.</b>
                    
                    常用的插件都有哪些
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.3" data-path="faq/Highlight.html">
            
                <a href="faq/Highlight.html">
            
                    
                        <b>3.3.</b>
                    
                    如何高亮代码
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.4" data-path="faq/Include.html">
            
                <a href="faq/Include.html">
            
                    
                        <b>3.4.</b>
                    
                    如何引入外部文件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.5" data-path="faq/Exercise.html">
            
                <a href="faq/Exercise.html">
            
                    
                        <b>3.5.</b>
                    
                    添加测验功能
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.6" data-path="faq/Reference.html">
            
                <a href="faq/Reference.html">
            
                    
                        <b>3.6.</b>
                    
                    如何添加参考文献
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.7" data-path="faq/Url-embed.html">
            
                <a href="faq/Url-embed.html">
            
                    
                        <b>3.7.</b>
                    
                    如何插入外部页面
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">如何定制</li>
        
        
    
        <li class="chapter " data-level="4.1" data-path="faq/Title.html">
            
                <a href="faq/Title.html">
            
                    
                        <b>4.1.</b>
                    
                    如何更改电子书的标题
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.2" data-path="faq/Css.html">
            
                <a href="faq/Css.html">
            
                    
                        <b>4.2.</b>
                    
                    如何自定义样式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.3" data-path="faq/Number.html">
            
                <a href="faq/Number.html">
            
                    
                        <b>4.3.</b>
                    
                    如何为目录添加序号
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.4" data-path="faq/Sidebar.html">
            
                <a href="faq/Sidebar.html">
            
                    
                        <b>4.4.</b>
                    
                    如何在左侧导航栏添加链接
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">托管问题</li>
        
        
    
        <li class="chapter active" data-level="5.1" data-path="UsingPages.html">
            
                <a href="UsingPages.html">
            
                    
                        <b>5.1.</b>
                    
                    如何托管到Pages上
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">多人协作</li>
        
        
    
        <li class="chapter " data-level="6.1" data-path="Collaborate.html">
            
                <a href="Collaborate.html">
            
                    
                        <b>6.1.</b>
                    
                    如何实现多人协作
            
                </a>
            

            
        </li>
    

    
        
        <li class="divider"></li>
        
        
    
        <li class="chapter " data-level="7.1" data-path="References.html">
            
                <a href="References.html">
            
                    
                        <b>7.1.</b>
                    
                    参考文献
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="." >如何托管到Pages上</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="&#x5C06;book&#x53D1;&#x5E03;&#x5230;pages&#x4E0A;">&#x5C06;_book&#x53D1;&#x5E03;&#x5230;pages&#x4E0A;</h1>
<p>Pages &#x662F;github&#x7C7B;&#x7F51;&#x7AD9;&#x63D0;&#x4F9B;&#x7684;&#x514D;&#x8D39;&#x7684;&#x9759;&#x6001;&#x7F51;&#x9875;&#x6258;&#x7BA1;&#x670D;&#x52A1;&#xFF0C;&#x65E2;&#x7136;GitBook&#x80FD;&#x751F;&#x6210;&#x57FA;&#x4E8E;HTTML&#x7684;&#x9759;&#x6001;&#x7535;&#x5B50;&#x4E66;&#x7C4D;&#xFF0C;&#x90A3;&#x81EA;&#x7136;&#x800C;&#x7136;&#xFF0C;&#x6211;&#x4EEC;&#x5C31;&#x4F1A;&#x6709;&#x5C06;GitBook&#x9759;&#x6001;&#x9875;&#x9762;&#x53D1;&#x5E03;&#x5230;pages&#x670D;&#x52A1;&#x7684;&#x9700;&#x6C42;&#x3002;</p>
<p>&#x9664;&#x4E86;&#x80FD;&#x591F;&#x5C06;&#x4E66;&#x7C4D;&#x53D1;&#x5E03;&#x5230;GitBook.com&#x5916;&#xFF0C;&#x7528;&#x6237;&#x8FD8;&#x53EF;&#x4EE5;&#x5C06;&#x7535;&#x5B50;&#x4E66;&#x53D1;&#x5E03;&#x5230;&#x63D0;&#x4F9B;Pages&#x670D;&#x52A1;&#x7684;GitHub&#x7C7B;&#x7AD9;&#x70B9;&#x4E0A;&#xFF0C;&#x5982;&#x56FD;&#x5185;&#x7684;oschina&#x3001;coding.net&#x7B49;&#x7B49;&#x3002;&#x8FD9;&#x6837;&#x505A;&#x6709;&#x4E2A;&#x597D;&#x5904;&#xFF0C;&#x5C31;&#x662F;&#x8BBF;&#x95EE;&#x901F;&#x5EA6;&#x6BD4;gitbook.com&#x5FEB;&#x5F88;&#x591A;&#x3002;</p>
<p>&#x8FD9;&#x4E2A;&#x9700;&#x6C42;&#x60C5;&#x666F;&#x5B9E;&#x9645;&#x4E0A;&#x662F;git&#x7684;&#x5E94;&#x7528;&#xFF0C;&#x5373;&#x5C06;&#x4E66;&#x7C4D;&#x7684;&#x6E90;&#x7801;&#x5B58;&#x653E;&#x5230;&#x4ED3;&#x5E93;&#x7684;master&#x5206;&#x652F;&#xFF0C;&#x800C;&#x5C06;&#x4E66;&#x7C4D;&#x7684;html&#x7248;&#x672C;&#x5B58;&#x653E;&#x5230;&#x4ED3;&#x5E93;&#x7684;pages&#x5206;&#x652F;&#xFF0C;</p>
<h2 id="&#x5C06;&#x4E66;&#x7C4D;&#x6E90;&#x7801;&#x6258;&#x7BA1;&#x5230;git&#x8FDC;&#x7AEF;&#x4ED3;&#x5E93;">&#x5C06;&#x4E66;&#x7C4D;&#x6E90;&#x7801;&#x6258;&#x7BA1;&#x5230;git&#x8FDC;&#x7AEF;&#x4ED3;&#x5E93;</h2>
<p>&#x8FD9;&#x4E00;&#x73AF;&#x8282;&#x7684;&#x4EFB;&#x52A1;&#x5C31;&#x662F;&#x5C06;&#x4E66;&#x7C4D;&#x7684;&#x6E90;&#x7801;&#xFF08;&#x4E0D;&#x542B;gitbook build&#x751F;&#x6210;&#x7684;&#x5185;&#x5BB9;&#xFF09;&#x63A8;&#x9001;&#x5230;&#x8FDC;&#x7AEF;&#x4ED3;&#x5E93;&#x3002;</p>
<h3 id="&#x65B0;&#x5EFA;&#x4ED3;&#x5E93;">&#x65B0;&#x5EFA;&#x4ED3;&#x5E93;</h3>
<p>&#x5728;GitBook&#x9879;&#x76EE;&#x76EE;&#x5F55;&#xFF0C;&#x5982;<code>mybook</code>&#x4E2D;&#xFF0C;&#x6267;&#x884C;&#x5982;&#x4E0B;&#x547D;&#x4EE4;&#xFF0C;&#x521B;&#x5EFA;&#x672C;&#x5730;git&#x4ED3;&#x5E93;&#xFF1A;</p>
<pre class="language-"><code class="lang-bash"><span class="token function">git</span> init
</code></pre>
<h3 id="&#x6DFB;&#x52A0;&#x5FFD;&#x7565;&#x6587;&#x4EF6;">&#x6DFB;&#x52A0;&#x5FFD;&#x7565;&#x6587;&#x4EF6;</h3>
<p>&#x4F7F;&#x7528;&#x6587;&#x672C;&#x7F16;&#x8F91;&#x5668;&#xFF0C;&#x521B;&#x5EFA;&#x540D;&#x4E3A;<code>.gitignore</code>&#x7684;&#x6587;&#x4EF6;&#xFF0C;&#x5185;&#x5BB9;&#x5982;&#x4E0B;&#xFF1A;</p>
<pre class="language-"><code class="lang-bash">*~
_book
.DS_Store
</code></pre>
<p>&#x901A;&#x8FC7;<code>.gitignore</code>&#x6587;&#x4EF6;&#xFF0C;&#x672C;&#x5730;&#x4ED3;&#x5E93;&#x5C06;&#x5FFD;&#x7565;&#x4E34;&#x65F6;&#x6587;&#x4EF6;&#x548C;<code>_book</code>&#x6587;&#x4EF6;&#x5939;&#xFF0C;&#x8FBE;&#x5230;&#x53EA;&#x4FDD;&#x5B58;&#x4E66;&#x7C4D;&#x6E90;&#x7801;&#x7684;&#x76EE;&#x7684;&#x3002;</p>
<h3 id="&#x6DFB;&#x52A0;&#x6587;&#x4EF6;">&#x6DFB;&#x52A0;&#x6587;&#x4EF6;</h3>
<p>&#x73B0;&#x5728;&#x53EF;&#x4EE5;&#x5C06;&#x672C;&#x5730;&#x4E66;&#x7C4D;&#x6E90;&#x7801;&#x6DFB;&#x52A0;&#x5230;&#x672C;&#x5730;git&#x4ED3;&#x5E93;&#x4E2D;&#x4E86;&#xFF1A;</p>
<pre class="language-"><code class="lang-bash"><span class="token function">git</span> add <span class="token keyword">.</span>
</code></pre>
<h3 id="&#x6DFB;&#x52A0;&#x66F4;&#x65B0;&#x8BF4;&#x660E;">&#x6DFB;&#x52A0;&#x66F4;&#x65B0;&#x8BF4;&#x660E;</h3>
<pre class="language-"><code class="lang-bash"><span class="token function">git</span> commit -m <span class="token string">&apos;&#x66F4;&#x65B0;&#x8BF4;&#x660E;&#x6587;&#x5B57;&apos;</span>
</code></pre>
<h3 id="&#x5EFA;&#x7ACB;&#x672C;&#x5730;&#x4ED3;&#x5E93;&#x4E0E;&#x8FDC;&#x7AEF;&#x4ED3;&#x5E93;&#x7684;&#x5BF9;&#x5E94;&#x5173;&#x7CFB;">&#x5EFA;&#x7ACB;&#x672C;&#x5730;&#x4ED3;&#x5E93;&#x4E0E;&#x8FDC;&#x7AEF;&#x4ED3;&#x5E93;&#x7684;&#x5BF9;&#x5E94;&#x5173;&#x7CFB;</h3>
<pre class="language-"><code class="lang-bash"><span class="token function">git</span> remote add origin https://&#x8FDC;&#x7A0B;&#x4ED3;&#x5E93;&#x5730;&#x5740;.git
</code></pre>
<h3 id="&#x63A8;&#x9001;">&#x63A8;&#x9001;</h3>
<p>&#x5C06;&#x672C;&#x5730;&#x4ED3;&#x5E93;&#x5185;&#x5BB9;&#x540C;&#x6B65;&#x5230;&#x8FDC;&#x7AEF;&#x4ED3;&#x5E93;&#xFF1A;</p>
<pre class="language-"><code class="lang-bash"><span class="token function">git</span> push -u origin master
</code></pre>
<p>&#x81F3;&#x6B64;&#xFF0C;&#x5C31;&#x5B8C;&#x6210;&#x4E86;&#x5C06;gitbook&#x6E90;&#x7801;&#x63A8;&#x9001;&#x5230;&#x8FDC;&#x7A0B;&#x4ED3;&#x5E93;&#x7684;&#x4EFB;&#x52A1;&#xFF0C;&#x4E4B;&#x540E;&#x4E66;&#x7C4D;&#x5185;&#x5BB9;&#x4FEE;&#x6539;&#x540E;&#xFF0C;&#x6267;&#x884C;&#x5982;&#x4E0B;&#x64CD;&#x4F5C;&#x5373;&#x53EF;&#xFF1A;</p>
<pre class="language-"><code class="lang-bash"><span class="token function">git</span> add <span class="token keyword">.</span>
<span class="token function">git</span> commit -m <span class="token string">&apos;&#x66F4;&#x65B0;&#x8BF4;&#x660E;&#x6587;&#x5B57;&apos;</span>
<span class="token function">git</span> push -u origin master
</code></pre>
<h2 id="&#x4F7F;&#x7528;pages&#x670D;&#x52A1;&#x5C55;&#x793A;gitbook&#x4E66;&#x7C4D;">&#x4F7F;&#x7528;pages&#x670D;&#x52A1;&#x5C55;&#x793A;gitbook&#x4E66;&#x7C4D;</h2>
<p>&#x63A5;&#x4E0B;&#x6765;&#xFF0C;&#x9700;&#x8981;&#x5728;&#x539F;&#x6709;&#x672C;&#x5730;&#x4ED3;&#x5E93;&#x65B0;&#x5EFA;&#x4E00;&#x4E2A;&#x5206;&#x652F;&#xFF0C;&#x5728;&#x8FD9;&#x4E2A;&#x5206;&#x652F;&#x4E2D;&#xFF0C;&#x53EA;&#x4FDD;&#x7559;_book&#x6587;&#x4EF6;&#x5939;&#x4E2D;&#x7684;&#x5185;&#x5BB9;&#xFF0C;&#x7136;&#x540E;&#x5C06;&#x8FD9;&#x4E9B;&#x5185;&#x5BB9;&#x63A8;&#x9001;&#x5230;&#x8FDC;&#x7A0B;&#x4ED3;&#x5E93;&#x7684;pages&#x5206;&#x652F;&#xFF0C;&#x542F;&#x7528;pages&#x670D;&#x52A1;&#xFF0C;&#x6700;&#x7EC8;&#x8FBE;&#x5230;&#x514D;&#x8D39;&#x53D1;&#x5E03;&#x7535;&#x5B50;&#x4E66;&#x7684;&#x76EE;&#x7684;&#x3002;</p>
<h3 id="&#x65B0;&#x5EFA;&#x5206;&#x652F;">&#x65B0;&#x5EFA;&#x5206;&#x652F;</h3>
<pre class="language-"><code class="lang-bash"><span class="token function">git</span> checkout --orphan pages
</code></pre>
<p>&#x65B0;&#x5EFA;&#x540D;&#x4E3A;pages&#x7684;&#x5206;&#x652F;&#xFF0C;&#x5206;&#x652F;&#x540D;&#x79F0;&#x968F;&#x610F;&#xFF0C;&#x4F46;&#x6700;&#x597D;&#x80FD;&#x53CD;&#x6620;&#x51FA;&#x5206;&#x652F;&#x7684;&#x7528;&#x9014;&#x3002;</p>
<h3 id="&#x5220;&#x9664;&#x4E0D;&#x9700;&#x8981;&#x7684;&#x6587;&#x4EF6;">&#x5220;&#x9664;&#x4E0D;&#x9700;&#x8981;&#x7684;&#x6587;&#x4EF6;</h3>
<p>&#x5207;&#x6362;&#x5230;pages&#x5206;&#x652F;&#x540E;&#xFF0C;&#x6211;&#x4EEC;&#x9700;&#x8981;&#x5C06;_books&#x76EE;&#x5F55;&#x4E4B;&#x5916;&#x7684;&#x6587;&#x4EF6;&#x90FD;&#x6E05;&#x7406;&#x6389;&#xFF1A;</p>
<pre class="language-"><code class="lang-bash"><span class="token function">git</span> <span class="token function">rm</span> --cached -r <span class="token keyword">.</span>
<span class="token function">git</span> clean -df
<span class="token function">rm</span> -rf *~
</code></pre>
<h3 id="&#x6DFB;&#x52A0;&#x5FFD;&#x7565;&#x6587;&#x4EF6;">&#x6DFB;&#x52A0;&#x5FFD;&#x7565;&#x6587;&#x4EF6;</h3>
<p>&#x4F7F;&#x7528;&#x6587;&#x672C;&#x7F16;&#x8F91;&#x5668;&#xFF0C;&#x521B;&#x5EFA;&#x540D;&#x4E3A;.gitignore&#x7684;&#x6587;&#x4EF6;&#xFF0C;&#x5185;&#x5BB9;&#x5982;&#x4E0B;&#xFF1A;</p>
<pre class="language-"><code class="lang-bash">*~
_book
.DS_Store
</code></pre>
<p>&#x901A;&#x8FC7;.gitignore&#x6587;&#x4EF6;&#xFF0C;&#x672C;&#x5730;&#x4ED3;&#x5E93;&#x5C06;&#x5FFD;&#x7565;&#x4E34;&#x65F6;&#x6587;&#x4EF6;&#x548C;_book&#x6587;&#x4EF6;&#x5939;&#x3002;</p>
<h3 id="&#x590D;&#x5236;book&#x6587;&#x4EF6;&#x5939;&#x5230;&#x5206;&#x652F;&#x6839;&#x76EE;&#x5F55;">&#x590D;&#x5236;_book&#x6587;&#x4EF6;&#x5939;&#x5230;&#x5206;&#x652F;&#x6839;&#x76EE;&#x5F55;</h3>
<pre class="language-"><code class="lang-bash"><span class="token function">cp</span> -r _book/* <span class="token keyword">.</span>
</code></pre>
<h3 id="&#x6DFB;&#x52A0;&#x6587;&#x4EF6;">&#x6DFB;&#x52A0;&#x6587;&#x4EF6;</h3>
<pre class="language-"><code class="lang-bash"><span class="token function">git</span> add <span class="token keyword">.</span>
</code></pre>
<h3 id="&#x6DFB;&#x52A0;&#x66F4;&#x65B0;&#x8BF4;&#x660E;">&#x6DFB;&#x52A0;&#x66F4;&#x65B0;&#x8BF4;&#x660E;</h3>
<pre class="language-"><code class="lang-bash"><span class="token function">git</span> commit -m <span class="token string">&apos;&#x66F4;&#x65B0;&#x8BF4;&#x660E;&apos;</span>
</code></pre>
<h3 id="&#x63A8;&#x9001;">&#x63A8;&#x9001;</h3>
<pre class="language-"><code class="lang-bash"><span class="token function">git</span> push -u origin pages
</code></pre>
<p>&#x73B0;&#x5728;&#x5F00;&#x542F;git&#x6258;&#x7BA1;&#x7F51;&#x7AD9;&#x7684;pages&#x670D;&#x52A1;&#x5373;&#x53EF;&#x3002;</p>
<h2 id="&#x4E0A;&#x8FF0;&#x4EFB;&#x52A1;&#x7684;&#x81EA;&#x52A8;&#x5316;&#x811A;&#x672C;">&#x4E0A;&#x8FF0;&#x4EFB;&#x52A1;&#x7684;&#x81EA;&#x52A8;&#x5316;&#x811A;&#x672C;</h2>
<p>&#x547D;&#x4EE4;&#x884C;&#x7684;&#x7CBE;&#x9AD3;&#x5728;&#x4E8E;&#x53EF;&#x4EE5;&#x81EA;&#x52A8;&#x6267;&#x884C;&#xFF0C;&#x5982;&#x4E0B;&#x9762;&#x7684;&#x811A;&#x672C;&#xFF0C;&#x53EF;&#x4EE5;&#x5B8C;&#x6210;&#x540C;&#x65F6;&#x66F4;&#x65B0;master&#x5206;&#x652F;&#x548C;pages&#x5206;&#x652F;&#x7684;&#x76EE;&#x7684;&#x3002;</p>
<pre class="language-"><code class="lang-bash"><span class="token function">git</span> checkout master
<span class="token function">git</span> add <span class="token keyword">.</span>
<span class="token function">git</span> commit -m <span class="token variable">$1</span>
<span class="token function">git</span> push -u origin master
<span class="token function">git</span> checkout pages
<span class="token function">cp</span> -r _book/* <span class="token keyword">.</span>
<span class="token function">git</span> add <span class="token keyword">.</span>
<span class="token function">git</span> commit -m <span class="token variable">$1</span>
<span class="token function">git</span> push -u origin pages
<span class="token function">git</span> checkout master
</code></pre>
<p>&#x5728;&#x9700;&#x8981;&#x66F4;&#x65B0;&#x7684;&#x65F6;&#x5019;&#xFF0C;&#x6267;&#x884C;&#x5982;&#x4E0B;&#x547D;&#x4EE4;&#xFF1A;</p>
<pre class="language-"><code class="lang-bash">sh gitbook.sh <span class="token string">&apos;&#x66F4;&#x65B0;&#x8BF4;&#x660E;&apos;</span>
</code></pre>
<footer class="page-footer-ex"> <span class="page-footer-ex-copyright"> By <a href="http://yangzh.cn" target="_blank">yangzh</a>&#xFF0C;&#x4F7F;&#x7528;<a href="https://creativecommons.org/licenses/by-sa/4.0/" target="_blank">&#x77E5;&#x8BC6;&#x5171;&#x4EAB; &#x7F72;&#x540D;-&#x76F8;&#x540C;&#x65B9;&#x5F0F;&#x5171;&#x4EAB; 4.0&#x534F;&#x8BAE;</a>&#x53D1;&#x5E03; </span> &#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0; <span class="page-footer-ex-footer-update"> &#x6B64;&#x9875;&#x9762;&#x4FEE;&#x8BA2;&#x4E8E;&#xFF1A; 2018-10-18 22:34:00 </span> </footer>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="faq/Sidebar.html" class="navigation navigation-prev " aria-label="Previous page: 如何在左侧导航栏添加链接">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="Collaborate.html" class="navigation navigation-next " aria-label="Next page: 如何实现多人协作">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"如何托管到Pages上","level":"5.1","depth":1,"next":{"title":"如何实现多人协作","level":"6.1","depth":1,"path":"Collaborate.md","ref":"Collaborate.md","articles":[]},"previous":{"title":"如何在左侧导航栏添加链接","level":"4.4","depth":1,"path":"faq/Sidebar.md","ref":"faq/Sidebar.md","articles":[]},"dir":"ltr"},"config":{"plugins":["-sharing","sharing-plus","include-codeblock","ace","quiz","-lunr","-search","search-pro","collapsible-menu","bibtex-indexed-cite","-livereload","prism","-highlight","url-embed","page-footer-ex"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"prism":{"css":["prismjs/themes/prism-solarizedlight.css"]},"collapsible-menu":{},"ace":{},"page-footer-ex":{"copyright":"By [yangzh](http://yangzh.cn)，使用[知识共享 署名-相同方式共享 4.0协议](https://creativecommons.org/licenses/by-sa/4.0/)发布","markdown":true,"update_format":"YYYY-MM-DD HH:mm:ss","update_label":"此页面修订于："},"search-pro":{},"sharing-plus":{"qq":false,"all":["facebook","google","twitter","instapaper","linkedin","pocket","stumbleupon"],"douban":false,"facebook":true,"weibo":false,"instapaper":false,"whatsapp":false,"hatenaBookmark":false,"twitter":true,"messenger":false,"line":false,"vk":false,"pocket":true,"google":false,"viber":false,"stumbleupon":false,"qzone":false,"linkedin":false},"fontsettings":{"theme":"white","family":"sans","size":2},"bibtex-indexed-cite":{"path":"/"},"quiz":{"labels":{"check":"提交答案","showExplanation":"显示解释","showCorrect":"显示正确答案","explanationHeader":"释义"},"text":{"noChosen":"Choose at least one answer","incomplete":"Some correct answers are missing"},"buttons":{"showCorrect":true,"showExplanation":true}},"url-embed":{},"include-codeblock":{"check":false,"edit":false,"fixlang":false,"lang":"","template":"ace","theme":"chrome","unindent":true},"sharing":{"qq":true,"all":["facebook","google","twitter","weibo","qq","linkedin","qzone","douban"],"douban":false,"facebook":false,"weibo":true,"instapaper":false,"whatsapp":false,"hatenaBookmark":false,"twitter":false,"messenger":false,"line":false,"vk":false,"pocket":false,"google":false,"viber":false,"stumbleupon":false,"qzone":true,"linkedin":false},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":true}},"theme":"default","author":"yangjh","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"bibCount":0,"variables":{},"title":"GitBook学习笔记","links":{"sidebar":{"Home":"http://yangzh.cn"}},"bib":[{"citationKey":"GITBOOK.COM-2017","entryType":"ONLINE","entryTags":{"AUTHOR":"GitBook.com","TITLE":"GitBook Toolchain Documentation","YEAR":"2017","URL":"https://toolchain.gitbook.com/","URLDATE":"2017-06-05","FILE":"About this documentation · GitBook Toolchain Documentation:/Users/yangjh/Library/Application Support/Firefox/Profiles/qajuyzo4.default/zotero/storage/EQCVEXJ7/toolchain.gitbook.com.html:text/html"}}],"gitbook":"*"},"file":{"path":"UsingPages.md","mtime":"2018-10-18T14:34:00.644Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-11-03T05:15:23.933Z"},"basePath":".","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="gitbook/gitbook.js"></script>
    <script src="gitbook/theme.js"></script>
    
        
        <script src="gitbook/gitbook-plugin-sharing-plus/buttons.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-ace/ace/ace.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-ace/ace.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-quiz/script.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-search-pro/jquery.mark.min.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-search-pro/search.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-collapsible-menu/plugin.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

